// 获取字典数据列表
export const getDictDataList = (dictList, dictType) => {
	const type = dictList.find((element) => element.dictType === dictType)
	if (type) {
		return type.dataList
	} else {
		return []
	}
}

// 获取字典Label
export const getDictLabel = (dictList, dictType, dictValue) => {
	const type = dictList.find((element) => element.dictType === dictType)

	if (type) {
		const val = type.dataList.find((element) => element.dictValue === dictValue + '')

		if (val) {
			return val.dictLabel
		} else {
			return dictValue
		}
	} else {
		return dictValue
	}
}